package pers.kw.protocol;


import pers.kw.entity.TokenDto;

/**
 * 后续计划改为若依中的配置
 * SecurityContextHolder
 */
public class TokenContext {

    private static final ThreadLocal<TokenDto> threadLocal = new ThreadLocal<>();

    public static TokenDto current() {
        return threadLocal.get();
    }

    public static void setToken(TokenDto token) {
        threadLocal.set(token);
    }

    public static void remove() {
        threadLocal.remove();
    }
}
